﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LibNiconico.NiconicoApi.Internal;

namespace LibNiconico.NiconicoApi.Lives
{
    /// <summary>
    /// ニコニコ生放送過去コメント取得キー問い合わせ情報
    /// </summary>
    internal sealed class NicoLiveGetWayBackKeyQueryInfo:NicoUrlAble
    {
        /// <summary>
        /// スレッド番号
        /// </summary>
        internal string Thread { get; set; }
        
        /// <summary>
        /// 使用言語
        /// </summary>
        internal string Lang { get; set; }
        
        /// <summary>
        /// ロケール
        /// </summary>
        internal string Locale { get; set; }


        internal NicoLiveGetWayBackKeyQueryInfo(string thread)
            : this(thread, "ja-jp", "GLOBAL")
        {

        }

        internal NicoLiveGetWayBackKeyQueryInfo(string thread, string lang, string locale)
        {
            Thread = thread;
            Lang = lang;
            Locale = locale;
        }



        /// <summary>
        /// URLパスとして取得
        /// </summary>
        /// <returns></returns>
        internal override string AsPath()
        {
            return "api/getwaybackkey";
        }

        /// <summary>
        /// URL問い合わせ文字列として取得
        /// </summary>
        /// <returns></returns>
        internal override string AsQuery()
        {
            return string.Format("thread={0}&lang={1}&locale={2}", Thread, Lang, Locale);
        }

    }
}
